package com.appinterfacelite.mapper;

import com.appinterfacelite.entity.RoleEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * role表查询ORM映射
 */
@Mapper
public interface RoleMapper extends BaseMapper<RoleEntity> {
    @Select("select c.role_id " +
            "from " +
            "user_role_map a," +
            "users b," +
            "role c " +
            "where " +
            "a.person_id=b.userid " +
            "and a.role_id=c.role_id " +
//            "and c.memo='1' " +
            "and b.userid= #{user_id}")
    RoleEntity role_id_select(String user_id);
}
